const model = require('../models/BaseModel.js')
const { USER, PRODUCT_THEME} = require('../config/tableConfig.js')
const { USERFIELD } = require('../fields/userField.js')

/**
 * 获取用户表信息
 * @return 
 */
const getUser = (options) => {
  return model.query( USER, USERFIELD,options,0,10,{name:'sort',orderBy:'asc'} )
}
/**
 * 新增用户表信息
 * @return
 */
const addUser = (options) => {
  return model.add( USER, options)
}
/**
 * 更新用户表信息
 * @return
 */
const updateUser = (options) => {
  return model.update( USER, options)
}

module.exports = {
  getUser,
  addUser,
  updateUser
}